home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / knowhow4 / kh_draw.h < prev    next >
C/C++ Source or Header  |  1994-10-10  |  5KB  |  157 lines

  1. /*  KNOW-HOW.DRAW 2.1 - The PCX images Editor.
  2.     (C) Stepan S. Vartanov, 1993.
  3.     Contacts:
  4.  
  5.         ( D E A L E R S   I N V I T E D )
  6.  
  7.     ATTENTION !!! This product needs the KNOW-HOW 4.x interface library
  8.                   and (desirable) KNOW-HOW 1.x PRINT MANAGER SYSTEM
  9. */
  10.  
  11. #ifndef __KH_DRAW_H_
  12. #define __KH_DRAW_H_
  13. #include "b&w.h"
  14. #include "board.h"
  15. #include "help.h"        // Help system
  16. #include "prn_form.h"    // Printer setup
  17. #include "appkit.h"
  18. #include "blkwrite.h"
  19. #include "microsc.h"
  20. #include "bldraw.h"
  21. #include "icons.h"
  22. #include "blkmenu.h"
  23. #include "bllmenu.h"
  24. #include "blkpanel.h"
  25. #include "icon.h"
  26. #include "editl.h"
  27. #include "print.h"
  28. #include "blfsys.h"
  29. #include "tools.h"
  30. #include "elemmenu.h"
  31. #include "col_sbar.h"
  32.  
  33. enum { AC_FILE_MENU = 101, AC_EDIT_MENU, // items of the line menu
  34.        AC_EFFECTS_MENU, AC_TEXT_MENU, AC_METHOD_MENU, AC_SCRIPT_MENU,
  35.        AC_PRINT_MENU,
  36.  
  37.        AC_NEW, AC_OPEN, AC_SAVE, AC_SAVE_AS_BW, AC_ABOUT,   // go here from "file_menu"
  38.  
  39.        AC_FILL_PANEL, // go here from "fill_prompt"
  40.  
  41.        AC_TOOL_UNDO, AC_FILTER, AC_DITHER,        // go here from "effects_menu"
  42.        AC_TEXT, AC_SCROLL, AC_LOCAL_UNDO,
  43.  
  44.        AC_FILTERS, AC_DITHERS, AC_GRADS, AC_ERROR_PROP,
  45.  
  46.        AC_EDIT_CUT, AC_COPY, AC_COPY_FROM,  // go here from edit_menu
  47.        AC_COPY_TO, AC_COPY_TO_BW, AC_PASTE, AC_ZOOM, AC_TRANS, AC_PREVIEW,
  48.  
  49.        AC_TEXT_SIZE,    // go here from "text_menu"
  50.        AC_TEXT_DIR,
  51.        AC_TEXT_FONT,
  52.  
  53.        AC_TEXT_EDIT,
  54.  
  55.        AC_TOOLS, AC_TOOLS_1, AC_COLORS,         // go here from "methods menu"
  56.        AC_BAKS, AC_FILL_PROMPT, AC_DRAW,
  57.  
  58.        AC_SCRIPT_PLAY, AC_SCRIPT_RECORD, // go here from "script_menu"
  59.        AC_SCRIPT_END, AC_MACROS_KEEP, AC_EDITOR, AC_RESERVED,
  60.  
  61.        AC_LINE_WIDTH, AC_MICROSCOPE,           // go here from "tool_panel"
  62.        AC_SCISSORS, AC_ERASER, AC_COLOR_ERASER,
  63.        AC_FILL, AC_RECTANGLE, AC_CIRCLE, AC_LINE,
  64.        AC_PEN,
  65.  
  66.        AC_LINE_1, AC_LINE_6 = AC_LINE_1 + 5,  // go here from "lines_panel"
  67.  
  68.        AC_BLACK, AC_WHITE = AC_BLACK + 15,    // go here from "colors" and
  69.        AC_BLACK1, AC_WHITE1 = AC_BLACK1 + 15, // "background" panels
  70.  
  71.        AC_FILL1, AC_FILL48 = AC_FILL1 + 48,   // go here from "fill_panel"
  72.  
  73.        AC_MICROSCOPE_2,    // go here from microscope
  74.        AC_ASK_EXIT,
  75.  
  76.        AC_PRINT,    // go here from "form" (print setup)
  77.        AC_SIZE1, AC_SIZE2 = AC_SIZE1 + 15, // font deformation
  78.        AC_HORIZ, AC_VERT,
  79.  
  80.        AC_FILTER1, AC_FILTER2, AC_FILTER3, AC_FILTER4, AC_FILTER5,
  81.        AC_FILTER6, AC_FILTER7, AC_FILTER8, AC_FILTER9, AC_FILTER10,
  82.        AC_FILTER11, AC_FILTER12, AC_FILTER13, AC_FILTER14,
  83.  
  84.        AC_DITHER1, AC_DITHER2, AC_DITHER3, AC_DITHER4, AC_DITHER5, AC_DITHER6,
  85.        AC_DITHER7, AC_DITHER8, AC_DITHER9, AC_DITHER10, AC_DITHER11,
  86.        AC_DITHER12, AC_DITHER13, AC_DITHER14,
  87.  
  88.        AC_NO_GRAD, AC_HORIZ_GRAD, AC_VERT_GRAD,
  89.  
  90.        AC_NO_ERROR_PROP, AC_ERROR_PROP_ON,
  91.  
  92.        AC_MOVE_APPL, AC_RESIZE_APPL,
  93.  
  94.        AC_BUFFER_SIZE, AC_BUFFER_SIZE7 = AC_BUFFER_SIZE + 7,
  95.        AC_FILE
  96.     };
  97.  
  98. class KH_Draw : public ApplicationKit
  99.     {
  100.     protected:
  101.         int DATA_ATTR,   DATA_BAK,         DATA_FILL, DATA_FILE, // flags
  102.             DATA_LINE,   DATA_EDIT,        DATA_SIZE,
  103.             DATA_TOOLS,  DATA_DIR,         DATA_ZOOM, DATA_TRANS,
  104.             DATA_PRINT,  DATA_FILTER,      DATA_GRAD, DATA_ERROR_PROP,
  105.             DATA_DITHER, DATA_BUFFER_SIZE, DATA_X,    DATA_Y,
  106.             DATA_PREVIEW;
  107.  
  108.         char* fontName;
  109.  
  110.         Window* w1;
  111.         BlockMenu* file_menu;
  112.         BlockFile* file_sys;
  113.         BlockMenu* methods_menu;
  114.         BlockDraw* draw;
  115.         BlockLineMenu* menu;
  116.         IconMenu* tool_panel;
  117.         BlockPanel* lines_panel;
  118.         IconMenu* resize_panel;
  119.         ColorScrollBar* colors_panel;
  120.         ColorScrollBar* colors2_panel;
  121.         BlockPanel* fill_panel;
  122. //      IconMenu* fill_prompt;
  123.         Element* fill_prompt;
  124.         BlockMenu* edit_menu;
  125.         BlockMenu* text_menu;
  126.         BlockMenu* font_menu;
  127.         BlockMenu* size_menu;
  128.         Microscope* micro;
  129.         BlockMenu* script_menu;
  130.         PrintManager* print;
  131.         GrafBuffer* buffer;
  132.         Form* form;
  133.         BlockMenu* filters;
  134.         BlockMenu* dithers;
  135.         BlockMenu* buffer_size;
  136.         BlockMenu* dir_menu;
  137.         BlockMenu* grads;
  138.         BlockMenu* error_prop;
  139.         IconMenu* tool_panel1;
  140.         BlockMenu* effects_menu;
  141.         BlockWrite* editor;
  142.  
  143.     public:
  144.         KH_Draw(char* fileName, char* buf_name, int obj_number = 0,
  145.                 int step = 1);
  146.         virtual ~KH_Draw();
  147.         virtual void show();
  148.         virtual void rearrange();
  149.         virtual int application(int n);
  150.         void prepare_files();
  151.         void askSave();
  152.         virtual int active() { return w1->active(); }
  153.     friend int application(int num_in_switch, KH_Draw* kit);
  154.     friend class Draw;
  155.     };
  156.  
  157. #endif __KH_DRAW_H_